﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LocationTemplate.aspx.cs" Inherits="WMS6.Web.Configuration.LocationTemplate" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>LocationTemplate</title>
  <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>
    <script src="../Js/util.js" id="js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>    
    <script src="../Js/Verification.js" type="text/javascript"></script>    
    
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }
        
        function newLocTemplate()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "LocationTemplate.aspx?from="+escape(from);
            return false;
        }
        //验证输入的顺序
        function OrderField(key)
        {
           document.getElementById('lblMsg').style.display = "none";
                document.getElementById('lblMsg').innerText = "";
           switch(key)
           {
              case 1:              
              break;
              case 2:
              if(document.getElementById('txtLength02').value != "")
              {
              if(document.getElementById('txtLength01').value!="")
              {
                dataVer._Is123Max(document.getElementById('txtLength02'),'lblMsg',5)
              } 
              else
              {
               document.getElementById('txtLength02').value=""; 
                document.getElementById('txtLength01').focus();
                document.getElementById('lblMsg').style.display = "block";
                document.getElementById('lblMsg').innerText = '<%=GetGlobalMsgResource("F2320_001") %>';
              }  
              }           
              break;  
              case 3:
              if(document.getElementById('txtLength03').value != "")
              {
              if(document.getElementById('txtLength02').value!="")
              {
                dataVer._Is123Max(document.getElementById('txtLength03'),'lblMsg',5)
              } 
              else
              {
               document.getElementById('txtLength03').value=""; 
                document.getElementById('txtLength02').focus();
                document.getElementById('lblMsg').style.display = "block";
                document.getElementById('lblMsg').innerText = '<%=GetGlobalMsgResource("F2320_002") %>';
              }   
              }          
              break;  
              case 4:
              if(document.getElementById('txtLength04').value != "")
              {
              if(document.getElementById('txtLength03').value!="")
              {
                dataVer._Is123Max(document.getElementById('txtLength04'),'lblMsg',5)
              } 
              else
              {
                document.getElementById('txtLength04').value=""; 
                document.getElementById('txtLength03').focus();
                document.getElementById('lblMsg').style.display = "block";
                document.getElementById('lblMsg').innerText = '<%=GetGlobalMsgResource("F2320_003") %>';
              }  
              }           
              break;  
              case 5:
              if(document.getElementById('txtLength05').value != "")
              {
              if(document.getElementById('txtLength04').value!="")
              {
                dataVer._Is123Max(document.getElementById('txtLength05'),'lblMsg',5)
              } 
              else
              {
                 document.getElementById('txtLength05').value=""; 
                document.getElementById('txtLength04').focus();
                document.getElementById('lblMsg').style.display = "block";
                document.getElementById('lblMsg').innerText = '<%=GetGlobalMsgResource("F2320_004") %>';
              }    
              }         
              break;  
           }
        } 
        
        function confirmMsg(code)
        {
            if(code == "C001")
            {
                if(confirm('<%=GetGlobalMsgResource("C001") %>'))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }

        }
    
    </script>
</head>
<body>
    <form id="F2141" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom"><asp:Label ID="lblLocTemplate" runat="server" 
                            CssClass="label_header" Text="货位模板" meta:resourcekey="lblLocTemplate"></asp:Label></td>
                    <td><asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnGoBack%>"  
                            Enabled="False" onclick="btnGoBack_Click" 
                             /></td>
                    <td><asp:Button ID="btnNew" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnNew%>"  
                            Enabled="False" AccessKey="n" OnClientClick="newLocTemplate();" 
                            /></td>
                    <td><asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>" 
                            Enabled="False" AccessKey="s" onclick="btnSave_Click" 
                             /></td>
                    <td><asp:Button ID="btnDelete" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnDelete%>"  
                            Enabled="False" AccessKey="d" 
                            OnClientClick="javascript:if(confirmMsg('C001')) return true; else return false;" 
                            onclick="btnDelete_Click"  /></td>
                    <td><asp:Button ID="btnCopy" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnCopy%>" Enabled="False" 
                            AccessKey="c" onclick="btnCopy_Click" 
                             /></td>
                </tr>
            </table>
        </div>
        <asp:UpdatePanel ID="up1" runat="server"><ContentTemplate>
        <div>
            <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                meta:resourcekey="lblMsg"></asp:Label>
        </div>
        <div id="div_menu">
            <div style="float: left; width: 8px;">
                <div class="tabL" id="imgL1"></div>
            </div>
            <div class="tabLabelCont tabCur" id="div1">
                <asp:Label ID="one1" runat="server" class="hover" Text="货位模板" 
                    meta:resourcekey="one1"></asp:Label></div>
            <div style="float: left; margin-right: 2px;">
                <div class="tabR" id="imgR1"></div>
            </div>
        </div>
        
        <div id="div_content">
            <div id="con_one_1" style="display: block;">
                <table style="display: block; width: 720px; margin-left: 10px; margin-top: 10px;">
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td width="180">
                                        <asp:Label ID="lblLocTemplateID" runat="server" CssClass="label" Text="货位模板" 
                                            meta:resourcekey="lblLocTemplateID"></asp:Label><span
                                            class="must_input">*</span>
                                    </td>
                                    <td width="180">
                                        &nbsp;
                                    </td>
                                    <td width="180">
                                        &nbsp;
                                    </td>
                                    <td width="180">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:TextBox ID="txtLocTemplateID" runat="server" CssClass="textbox" 
                                            meta:resourcekey="txtLocTemplateID"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td width="180">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td width="180">
                                        <asp:Label ID="lblSeperatorChar" runat="server" CssClass="label" Text="分隔符" 
                                            meta:resourcekey="lblSeperatorChar"></asp:Label>
                                    </td>
                                    <td width="180">
                                        &nbsp;
                                    </td>
                                    <td width="180">
                                        &nbsp;
                                    </td>
                                    <td width="180">
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:TextBox ID="txtSeperatorChar" runat="server" CssClass="textbox" 
                                            MaxLength="1" onblur="JavaScript:dataVer._IsSeperatorChar(this,'lblMsg')" 
                                            meta:resourcekey="txtSeperatorChar"></asp:TextBox>
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td width="180">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table>
                                <tr>
                                    <td width="80">
                                    </td>
                                    <td width="200">
                                        <asp:Label ID="lblLength" runat="server" CssClass="label" Text="长度" 
                                            meta:resourcekey="lblLength"></asp:Label>
                                    </td>
                                    <td width="150">
                                        <asp:Label ID="lblType" runat="server" CssClass="label" Text="类型" 
                                            meta:resourcekey="lblType"></asp:Label>
                                    </td>
                                    <td width="180">
                                        <asp:Label ID="lblDesc" runat="server" CssClass="label" Text="描述" 
                                            meta:resourcekey="lblDesc"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Label ID="lblField01" runat="server" CssClass="label" Text="字段一" 
                                            meta:resourcekey="lblField01"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtLength01" runat="server" CssClass="textbox" 
                                            onblur="JavaScript:dataVer._Is123Max(this,'lblMsg',5)"  MaxLength="1" 
                                            meta:resourcekey="txtLength01" ></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlType01" runat="server" CssClass="selectbox" 
                                            meta:resourcekey="ddlType01"></asp:DropDownList>
                                    </td>
                                    <td width="180">
                                        <asp:TextBox ID="txtDesc01" runat="server" CssClass="textbox" 
                                            meta:resourcekey="txtDesc01"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
	                                <td>
		                                <asp:Label ID="lblField02" runat="server" CssClass="label" Text="字段二" 
                                            meta:resourcekey="lblField02"></asp:Label>
	                                </td>
	                                <td>
		                                <asp:TextBox ID="txtLength02" runat="server" CssClass="textbox" 
                                            onblur="JavaScript:OrderField(2)"  MaxLength="1" 
                                            meta:resourcekey="txtLength02" ></asp:TextBox>
	                                </td>
	                                <td>
		                                <asp:DropDownList ID="ddlType02" runat="server" CssClass="selectbox" 
                                            meta:resourcekey="ddlType02"></asp:DropDownList>
	                                </td>
	                                <td>
		                                <asp:TextBox ID="txtDesc02" runat="server" CssClass="textbox" 
                                            meta:resourcekey="txtDesc02"></asp:TextBox>
	                                </td>
                                </tr>
                                <tr>
	                                <td>
		                                <asp:Label ID="lblField03" runat="server" CssClass="label" Text="字段三" 
                                            meta:resourcekey="lblField03"></asp:Label>
	                                </td>
	                                <td>
		                                <asp:TextBox ID="txtLength03" runat="server" CssClass="textbox"  
                                            onblur="JavaScript:OrderField(3)" MaxLength="1" 
                                            meta:resourcekey="txtLength03" ></asp:TextBox>
	                                </td>
	                                <td>
		                                <asp:DropDownList ID="ddlType03" runat="server" CssClass="selectbox" 
                                            meta:resourcekey="ddlType03"></asp:DropDownList>
	                                </td>
	                                <td>
		                                <asp:TextBox ID="txtDesc03" runat="server" CssClass="textbox" 
                                            meta:resourcekey="txtDesc03"></asp:TextBox>
	                                </td>
                                </tr>
                                <tr>
	                                <td>
		                                <asp:Label ID="lblField04" runat="server" CssClass="label" Text="字段四" 
                                            meta:resourcekey="lblField04"></asp:Label>
	                                </td>
	                                <td>
		                                <asp:TextBox ID="txtLength04" runat="server" CssClass="textbox"  
                                            onblur="JavaScript:OrderField(4)"  MaxLength="1" 
                                            meta:resourcekey="txtLength04" ></asp:TextBox>
	                                </td>
	                                <td>
		                                <asp:DropDownList ID="ddlType04" runat="server" CssClass="selectbox" 
                                            meta:resourcekey="ddlType04"></asp:DropDownList>
	                                </td>
	                                <td>
		                                <asp:TextBox ID="txtDesc04" runat="server" CssClass="textbox" 
                                            meta:resourcekey="txtDesc04"></asp:TextBox>
	                                </td>
                                </tr>
                                <tr>
	                                <td>
		                                <asp:Label ID="lblField05" runat="server" CssClass="label" Text="字段五" 
                                            meta:resourcekey="lblField05"></asp:Label>
	                                </td>
	                                <td>
		                                <asp:TextBox ID="txtLength05" runat="server" CssClass="textbox"  
                                            onblur="JavaScript:OrderField(5)" MaxLength="1" 
                                            meta:resourcekey="txtLength05" ></asp:TextBox>
	                                </td>
	                                <td>
		                                <asp:DropDownList ID="ddlType05" runat="server" CssClass="selectbox" 
                                            meta:resourcekey="ddlType05"></asp:DropDownList>
	                                </td>
	                                <td>
		                                <asp:TextBox ID="txtDesc05" runat="server" CssClass="textbox" 
                                            meta:resourcekey="txtDesc05"></asp:TextBox>
	                                </td>
                                </tr>
                                <tr style="height: 10px;">
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:CheckBox ID="chkIsActive" runat="server" CssClass="checkbox" Text="启用" 
                                            Checked="True" meta:resourcekey="chkIsActive" />
                                    </td>
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                    <td >
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </div>
         </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnNew" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnCopy" EventName="Click" />
        </Triggers>
        </asp:UpdatePanel>
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
    </form>
</body>
</html>
